<template>
    <div ref="body">
        <Row style="padding: 8px">
                <span style="float: left;">
                 <Button type="primary" style="" @click="handleAdd">录入</Button>

                     </span>
        </Row>
        <div style="margin-top:10px ">
            <vxe-table border
                       auto-resize
                       row-id="id"
                       :row-key="true"
                       show-overflow="tooltip"
                       highlight-hover-row
                       align="center"
                       header-align="center"
                       ref="xTree"
                       :loading="Loading"
                       :data="tableData">
                <vxe-table-column field="ssba0001_name" title="收入所属 " align="center" min-width="100"/>
                <vxe-table-column field="ssba0003_name" title="收入类别" align="center" min-width="200"/>
                <vxe-table-column field="ssba0006" title="月收入金额" align="center" min-width="100"/>
                <vxe-table-column field="ssba0004_name" title="土地类型" align="center" min-width="200"/>
                <vxe-table-column field="ssba0005" title="土地亩数" align="center" min-width="200"/>
                <vxe-table-column field="ssba0007" title="一次性收入开始时间" align="center" min-width="200"
                                  :formatter="renderTime"/>
                <vxe-table-column field="ssba0009" title="一次性收入结束时间" align="center" min-width="200"
                                  :formatter="renderTime"/>
                <vxe-table-column title="操作" align="center" fixed="right" min-width="200">
                    <template #default="{row}">
                        <Button type="info" size="small" @click="handleEdit(row)">编辑</Button>
                        <Button type="error" size="small" @click="handleDelete(row.id)" style="margin-left: 5px">删除
                        </Button>
                        <Button type="success" size="small" @click="handleDetail(row)" style="margin-left:5px">详情
                        </Button>
                    </template>
                </vxe-table-column>
            </vxe-table>
            <Page :total="dataCount" :page-size="pageSize" show-total class="paging"
                  @on-change="handleTableChange" :current="pageNo"></Page>
        </div>

        <ss11303-modal ref="modalForm" @ok="modalFormOk"/>
        <div style="height:40px;line-height:40px;margin-top:10px;text-align: center ">
            <Button @click="prevStep">上一步</Button>
            <Button type="primary" @click="nextStep" style="margin-left:20px">下一步
            </Button>
        </div>
    </div>
</template>

<script>
    import {CommonMixin} from '@/views/common/js/CommonMixin'
    import Ss11303Modal from './modules/Ss11303Modal'
    import {getAction, postAction} from '@/api/request'

    export default {
        name: "application3",
        mixins: [CommonMixin],
        components: {Ss11303Modal},
        data() {
            return {
                url: {
                    list: "/api/ac/subsistence/ss11303Service/page",
                    delete: "/api/ac/subsistence/ss11303Service/delete"
                },
                Loading: true,
                queryParam: {
                    azcp0500: this.$parent.familyInfo.ss11301Id,
                },
            }
        },
        methods: {
            prevStep() {
                this.$emit('prevStep');
            },
            nextStep() {
                this.$emit('nextStep')
            },
        },
        created() {
            this.loadData();
        },
    }
</script>

<style scoped>

</style>
